<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/16 0016
 * Time: 13:57
 */

namespace App\App\Services;

use \App\Contracts\Services\SMSClient\SMSClientService as SMSClientServiceContracts;

class SMSClientService
{
    public $smsClientService;

    public function __construct(SMSClientServiceContracts $smsClientService)
    {
        $this->smsClientService = $smsClientService;
    }

    /**
     * 短信发送
     * @param $mobile
     * @return string
     * $url = 'http://memberrest.sobeycloud.com:8080/memberapi/api/SMS/send';
     */
    public function sendMsg($mobile)
    {
        return $this->smsClientService->sendMsg($mobile);
    }

    /**
     * 手机验证
     * @param $mobile
     * @param $code
     * @return string
     * $url = 'http://memberrest.sobeycloud.com:8080/memberapi/api/user/mobileCheck';
     */
    public function checkMobileCode($mobile, $code)
    {
        return $this->smsClientService->checkMobileCode($mobile, $code);
    }
}
